package com.example.service.usercoupon;

import com.example.dao.usercoupon.UserCouponUsedDao;
import com.example.pojo.Usercouponused;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserCouponUsedServiceImp implements  UserCouponUsedService{
    @Autowired
    UserCouponUsedDao userCouponUsedDao;
    @Override
    public List<Usercouponused> getUserCouponUseByUserId(int uid) {
        List<Usercouponused> userCouponUseByUserId = userCouponUsedDao.getUserCouponUseByUserId(uid);
        return userCouponUseByUserId;
    }

    @Override
    public boolean giveCoupons(int uid, int[] coupons) {
        boolean b = userCouponUsedDao.giveCoupons(uid, coupons);
        return b;
    }
}
